package com.b.dao;

import com.b.domain.Video;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
@Mapper
public interface VideoMapper {
    boolean deleteByPrimaryKey(Integer id);

    int insert(Video record);

    int insertSelective(Video record);

    Video selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Video record);

    int updateByPrimaryKey(Video record);

    @Select("select * from video")
    List<Video> getAll();

    @Update("update video set result = #{result}, reason = #{reason} where id = #{id}")
    void audit(@Param("id") Integer id, @Param("result")String result,  @Param("reason")String reason);
}